﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._12_享元模式
{
    public class ParticleType
    {
        public string Texture { get; }  // 共享属性
        public string Color { get; }    // 共享属性

        public ParticleType(string texture, string color)
        {
            Texture = texture;
            Color = color;
        }

        public void Draw(int x,int y)
        {
            Console.WriteLine($"在({x},{y})绘制[{Color}色{Texture}粒子]");
        }

    }
}
